s = 0
a = int(input("请输入a的值："))
n = int(input("请输入n的值："))
t = a
while n > 0:
    s += t
    a *= 10
    n -= 1
    t += a
print(f"s = {s}")
